{% spaceless %}
{% autoescape on %}
<!DOCTYPE html>
<html>
  <head>
    <title>Family Tree Wiki: {% block title %}Welcome{% endblock %}</title>
    <link rel="stylesheet" href="/static/css/main.css" type="text/css" media="screen" />
  </head>
  <body>

    <div class="ftw-top-bar">
      <div class="ftw-top-bar-user">
        {% if user %}
          <strong>{{ user }}</strong> | <a href="{{ logout_url }}">Sign out</a>
        {% else %}
          <a href="{{ login_url }}">Sign in</a>
        {% endif %}
      </div>
    </div>

    <div class="container">
      {% if query_proto %}
        <div class="historical">
          You are viewing historical data.
          <form action="/user/restore" method="{{submit_method}}">
            <input type="hidden" name="xsrf_token" value="{{xsrf_token}}" />
            <input type="hidden" name="proto" value="{{query_proto}}" />
            <input type="submit" value="Restore" />
          </form>
        </div>
      {% endif %}
     {% block content %}{% endblock %}

    </div>
    {% if on_dev %}
      <script type="text/javascript" src="//{{hostname}}:9087/compile?id=ftw&mode=SIMPLE"></script>
    {% else %}
      <script type="text/javascript" src="/static/js/core.js"></script>
    {% endif %}
    <script type="text/javascript">
      ftw.Core.init('{{user}}');
      {% block js_module_init %}{% endblock %}
    </script>
  </body>
</html>
{% endautoescape %}
{% endspaceless %}
